﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FineUI;
using OnlineTestBLL;
using OnlineTestModel;

namespace OnlineTestUI.BackManager
{
    public partial class addshort : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void BtAdd_Click(object sender, EventArgs e)
        {
            QuestionsBLL qb = new QuestionsBLL();
            Questions q = new Questions();
            q.QuestionName = tbquestion.Text;
            q.VersionNumber = 1;
            q.PreDifficult = tbpredifficult.Text;
            q.TrueDifficult = tbpredifficult.Text;//首次加入新题时，真实难度和预测难度相同
            q.Chapter = tbchapter.Text;
            q.Part = tbpart.Text;
            q.QuestionTypeId = 4;
            q.TotalCount = 0;
            q.CorrectCount = 0;
            q.BlankLine = Convert.ToInt32(tbblankline.Text);
            q.CorrectAnswer = taanswer.Text;
            q.PartitionDegree = tbpartitiondegree.Text;
            q.Status = 1;
            int result = qb.Add(q);
            if (result > 0)
            {
                Alert.Show("添加简答题成功");
            }

        }
    }
}